package com.example.demo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author :蕉绿
 * @Date : 2023/3/7 22:01
 * @Version : V1.0
 * @Description :
 */

//拦截器
@Configuration
public class AppConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginInterceptor())
//                .addPathPatterns("/**")   //拦截所有请求
//                .excludePathPatterns("/user/login");   //排除的url地址(不拦截它
    }
}
